import { JIANG_SU } from "@/util/constants"

export const tableOption = {
    "align": "center",
    "index": true,
    "border": true,
    "viewBtn": true,
    "column": [{
        "prop": "name",
        "type": "input",
        "label": "河湖名称",
        "search": true,
        "filters": true
    },
    {
        "prop": "level",
        "type": "select",
        "label": "河湖类型",
        "search": true,
        "filters": true,
        "props": {
            "label": "label",
            "value": "value"
        },
        "rules": [{
            "message": "请选择河湖类型",
            "required": true
        }],
        "dicData": [{
            "label": "骨干河道",
            "value": "1"
        },
        {
            "label": "城区河道",
            "value": "2"
        },
        {
            "label": "农村河道",
            "value": "3"
        },
        {
            "label": "大型湖泊",
            "value": "4"
        },
        {
            "label": "小型湖泊",
            "value": "5"
        },
        {
            "label": "大中型水库",
            "value": "6"
        },
        {
            "label": "小型水库",
            "value": "7"
        }],
        "display": true,
        "dataType": "string",
        "required": true,
    },
    {
        "prop": "intro",
        "type": "textarea",
        "label": "简介",
        "display": true
    },
    {
        label: '城市',
        prop: 'cityId',
        formslot: true,
        cascader: ['countyId'],
        dicUrl: "/river/sysregion/select/" + JIANG_SU,
        dicMethod: "get",
        slot: true,
        span: 12,
        cascaderIndex: 1,
        rules: [{
            required: true,
            message: '请选择城市',
            trigger: 'change'
        }],
        "display": true
    },
    {
        label: '区县',
        prop: 'countyId',
        formslot: true,
        slot: true,
        span: 12,
        rules: [{
            required: true,
            message: '请选择区县',
            trigger: 'change'
        }],
        cascaderIndex: 1,
        dicUrl: `/river/sysregion/select/{{key}}`,
        dicMethod: "get",
        "display": true
    },
    {
        "prop": "year",
        "type": "year",
        "label": "申报年度",
        "display": true,
        format: 'yyyy',
        "value-format": "yyyy",
        "dataType": "string",
        "search": true,
        // pickerOptions: {
        //     disabledDate(time) {
        //         //配置什么时间不能被选中
        //         return time.getTime() < Date.now();
        //     },
        // },
    },
    {
        "prop": "hezhangLevel",
        "span": 12,
        "type": "select",
        "label": "河长级别",
        "props": {
            "label": "label",
            "value": "value"
        },
        "rules": [],
        "dicData": [{
            "label": "省级",
            "value": "1"
        },
        {
            "label": "市级",
            "value": "2"
        },
        {
            "label": "县级",
            "value": "3"
        },
        {
            "label": "乡镇级",
            "value": "4"
        },
        {
            "label": "村级",
            "value": "5"
        }],
        "display": true,
        "dataType": "string",
    },
    {
        "prop": "hedaoGrade",
        "span": 12,
        "type": "select",
        "label": "河道等级",
        "props": {
            "label": "label",
            "value": "value"
        },
        "dicData": [{
            "label": "一级河道",
            "value": "1"
        },
        {
            "label": "二级河道",
            "value": "2"
        },
        {
            "label": "三级河道",
            "value": "3"
        },
        {
            "label": "四级河道",
            "value": "4"
        },
        {
            "label": "五级河道",
            "value": "5"
        }],
        "display": true,
        "dataType": "string",
    },
    {
        "prop": "length",
        "type": "number",
        "label": "河道长度"
    },
    {
        "prop": "reportLength",
        "type": "number",
        "label": "申报长度"
    },
    {
        "prop": "location",
        "type": "input",
        "label": "起止位置"
    },
    {
        "prop": "area",
        "type": "number",
        "label": "面积"
    },
    {
        "prop": "embankLength",
        "type": "number",
        "label": "堤防长度"
    },
    {
        "prop": "embankLoc",
        "type": "input",
        "label": "堤防位置"
    },
    {
        "prop": "selfScore",
        "label": "自评总分",
        "display": false,
    },
    {
        "prop": "systemScore",
        "label": "系统总分",
        "display": false,
    }
    ],
    "stripe": true,
    "menuAlign": "center",
    "indexLabel": "序号",
    "searchMenuSpan": 6
}